#!/bin/bash

read -p "input stu score >" score

if [ $score -lt 0 -o $score -gt 100 ]
then
	echo "输入有误"
	exit
fi

if [ $score -ge 90 -a $score -le 100 ]
then
	echo "A"
elif [ $score -ge 80 -a $score -le 89 ]
then
	echo "B"
elif [ $score -ge 70 -a $score -le 79 ]
then 
	echo "C"
elif [ $score -ge 60 -a $score -le 69 ]
then
	echo "D"
else
	echo "不及格"
fi
